C++ code: 
Coded by: David Desmarest

NOTE: To run the programs, change the filenames "... _exe.txt" into  "... .exe" (4 files):
	Mean_exe.txt
	Median1_exe.txt
	Median2_exe.txt
	Mode_exe.txt      
      
and the file ``LIST_COM.txt'' into "LIST.COM":
	LIST_COM.txt

Reference:
De Gooijer, J.G. and Gannoun, A. (2000).
   Nonparametric conditional predictive regions for time series.
   Computational Statistics & Data Analysis, 33(3), 259-275.
   DOI: 10.1016/s0167-9473(99)00056-0.

Examples:
Data file name : flow395
Sample size : 395
Enter k list (-1 to finish)
k = 1
k = -1
Enter m list (-1 to finish)
m = 1
m = -1
alpha=.9
T=394
sigmaZ = 28.1209
NK = 20
h1[1] = 8.51
hMin[1] = .01
hMax[1] = 9

-----
----- k = 1
-----

1 0.483158 28.5 47.9468 [26.9,71.8] [26.4,47.9] (0.943939) [26.4,33.5]U[47.3,47.9] (0.580005,0.363934)

Duration : 0h:3mm:11s (Windows 10, Intel Core i5; August 3, 2016)

Data file name : data500
Sample size : 500
Enter k list (-1 to finish)
k = 1
k = -1
Enter m list (-1 to finish)
m = 1 2 3 4 5 6 7 8 9 10
m = m = m = m = m = m = m = m = m = m = -1
alpha=.9
T=490
sigmaZ = 3.61347
NK = 20
h1[1] = 1.04685
hMin[1] = .01
hMax[1] = 4

-----
----- k = 1
-----

1 0.22 14.3271 13.8605 [13.0282,14.4979] [13.2617,14.502] (0.914556) [13.2617,14.2615]U[14.4865,14.502] (0.839374,0.062303)
2 0.22 5.39321 6.72756 [5.0388,9.14685] [5.0388,9.09363] (0.900043) [5.03297,7.0325]U[8.15484,9.09363] (0.680185,0.221418)
3 0.22 13.6774 14.0941 [11.9178,15.1898] [12.6952,15.613] (0.932026) [11.8512,11.9178]U[12.6952,14.8609] (0.0571371,0.845086)
4 0.22 7.48978 6.06622 [3.51824,11.2476] [3.85744,11.2476] (0.905111) [3.85744,8.09609]U[9.98754,11.389] (0.804971,0.107656)
5 0.22 14.2881 12.6904 [8.85768,15.2758] [10.1605,15.2758] (0.94698) [10.1605,11.7593]U[12.6884,15.2758] (0.265503,0.64746)
6 0.22 5.39991 8.56261 [3.07874,13.9015] [4.35809,13.9015] (0.905441) [4.35809,10.0942]U[11.1811,13.9015] (0.596829,0.306599)
7 0.22 13.7742 12.0774 [6.58885,14.5789] [8.9971,14.5731] (0.921473) [8.9971,10.3745]U[12.0267,14.5731] (0.253197,0.653369)
8 0.22 7.17179 9.69723 [4.93794,14.3331] [4.97732,14.327] (0.912961) [4.79246,10.354]U[13.5243,14.6943] (0.614085,0.291823)
9 0.43 15.2216 11.3734 [6.06027,14.3854] [6.108,14.811] (0.904602) [6.05871,6.87539]U[9.27584,14.811] (0.162024,0.740485)
10 2.95 3.08862 10.3247 [4.35809,14.7107] [5.21798,15.613] (0.902324) [4.7363,7.0325]U[7.73009,14.9526] (0.216278,0.684539)

Duration : 0h:13mm:57s